package com.rongc.client.freight.business.mine.view.adapter;

import android.content.Context;

import com.rongc.client.freight.R;
import com.rongc.client.freight.base.view.adapter.RecyclerBaseAdapter;

import org.json.JSONObject;

import java.util.List;

/**
 * Created by ccqx on 2017/6/28.
 */

public class RecyclerProblemAdapter extends RecyclerBaseAdapter<JSONObject>{


    public RecyclerProblemAdapter(Context mContext, List<JSONObject> mDatas) {
        super(mContext, mDatas);
    }

    @Override
    protected void onBind(final BaseRecyclerViewHolder holder, int position, JSONObject data) {
        holder.setText(R.id.tv_question,data.optString("title"));
        holder.setText(R.id.tv_answer,data.optString("content"));
    }

    @Override
    protected int getLayoutId() {
        return R.layout.recycler_problem_item;
    }
}
